package pl.edu.agh.gronoMining.frequentSubgraphFinder.strategy;

/**
 * Set of strategy rules. Contains type of start node and set of strategy rules for pairs (type1, type2)
 * where type1 and type2 are types of nodes in the edge.
 */
public interface Strategy {

	/**
	 * @return start node type
	 */
	public int getStartType();
	
	/**
	 * @param type star node type
	 */
	public void setStartType(int type);
	
	/**
	 * Search for strategy rule
	 * @param firstNodeType type of first node in the edge 
	 * @param nextNodeType type of second node in edge
	 * @return -1 -> null - no strategy rule found, <0 - don't expand, 0 - expand, <0 - expand, but limited amount of steps 
	 */
	public Integer getStrategyFor(int firstNodeType, int nextNodeType);
	
	/**
	 * Add strategy rule
	 * @param firstNodeType type of first node in edge
	 * @param nextNodeType type of second node in edge
	 * @param rule -1 -> don't expand, 0 - expand, <0 - expand, but limited amount of steps
	 */
	public void addStrategyRule(int firstNodeType, int nextNodeType, int rule);
	
}
